#ifndef SETZEROPOINTDIALOG_H
#define SETZEROPOINTDIALOG_H

#include <QDialog>
#include "../CommunicateDelegate/gSoapFoundation/soapStub.h"
#include <QStandardItem>

//using namespace hmigsoapnamespace;
namespace Ui {
class SetZeroPointDialog;
}
class CommunicateNormalDelegate;
class GlobalData;

class SetZeroPointDialog : public QDialog
{
    Q_OBJECT

public:
    explicit SetZeroPointDialog(int styleId,CommunicateNormalDelegate *communicateNormalDelegateIn,
                                GlobalData *globalDataIn,QWidget *parent = 0);
    ~SetZeroPointDialog();

    void initialDisplayStyle(int styleId);

public:
    void changeLanguage();
    void updateZeroCalculatePointView(std::vector<PointPro> pointList_zeroCalculateIn);
    void updateZeroCalculateResultView(AxisZeroOffsetInfo zeroInfo);

signals:
    /**
     * @brief loadBtnSignal     按钮信号
     */
    void calibrateAllAxisSignal();

    void allowCalibrateJogSignal(bool enable);

    void calibrateOneAxisSignal(int axisId);
    void getCalibrateInformation();
    void recordPoint_signal();
    void clearPoint_signal();
    void calculateZero_signal();
    void setZeroOffset_signal();


public slots:
    void showCalibrateInfo(S_AXISGROUP_ZERO_INFORMATION zeroInformationOut);

private slots:
    void on_LoadBtn_clicked();

    void on_returnBtn_clicked();

    void on_radioButton_clicked(bool checked);

    void on_radioButton_allowJog_clicked(bool checked);

    void on_pushButton_oneAxisCalibrate_clicked();

    void on_pushButton_getCalibrateInformation_clicked();

    void on_recordPoint_Btn_clicked();

    void on_button_clearPoint_clicked();

    void on_button_calculateZero_clicked();

    void on_button_setZeroOffset_clicked();

    void on_pushButton_clearRobotAllEncoderError_clicked();

    void on_pushButton_singleAxisEncoderError_clicked();

private:
    Ui::SetZeroPointDialog *ui;
    QStandardItemModel* model_axisgroupCalibrateInfo;
    CommunicateNormalDelegate *communicateNormalDelegate;
    GlobalData *globalData;

};

#endif // SETZEROPOINTDIALOG_H
